namespace SmartSoft.SystemForms
{
    using SmartSoft;
    using SmartSoft.Controls;
    using SmartSoft.ADP;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormCompanyEditor : FormControl
    {
        private BtnControl btnCancel;
        private BtnControl btnOk;
        private IContainer components;
        private bool ib_CheckAccepted;
        private LabelControl lblChu_Tk;
        private LabelControl lblDia_Chi;
        private LabelControl lblDia_Chi_E;
        private LabelControl lblMs_Thue;
        private LabelControl lblNgay_Bd_Ht;
        private LabelControl lblTen_Dvcs;
        private LabelControl lblTen_Dvcs_E;
        private LabelControl lblTen_NH;
        private LabelControl lblTen_TP;
        private LabelControl lblTk_NH;
        private CompanyDataAccess oDataAccess = new CompanyDataAccess();
        private DataTable oTable;
        private TextControl txtChu_Tk;
        private TextControl txtDia_Chi;
        private TextControl txtDia_Chi_E;
        private TextControl txtMs_Thue;
        private TextDate txtNgay_Bd_Ht;
        private TextControl txtTen_Dvcs;
        private TextControl txtTen_Dvcs_E;
        private TextControl txtTen_NH;
        private TextControl txtTen_TP;
        private TextControl txtTen_DvCs_Me;
        private TextSearch txtMa_DvCs_Me;
        private LabelControl lblMa_DvCs_Me;
        private TextControl txtTk_NH;

        public FormCompanyEditor()
        {
            this.InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            this.OnSave();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.btnOk = new SmartSoft.Controls.BtnControl();
            this.btnCancel = new SmartSoft.Controls.BtnControl();
            this.lblTen_Dvcs = new SmartSoft.Controls.LabelControl();
            this.txtTen_Dvcs = new SmartSoft.Controls.TextControl();
            this.lblTen_Dvcs_E = new SmartSoft.Controls.LabelControl();
            this.txtTen_Dvcs_E = new SmartSoft.Controls.TextControl();
            this.lblDia_Chi = new SmartSoft.Controls.LabelControl();
            this.txtDia_Chi = new SmartSoft.Controls.TextControl();
            this.lblMs_Thue = new SmartSoft.Controls.LabelControl();
            this.txtMs_Thue = new SmartSoft.Controls.TextControl();
            this.lblTk_NH = new SmartSoft.Controls.LabelControl();
            this.txtTk_NH = new SmartSoft.Controls.TextControl();
            this.lblChu_Tk = new SmartSoft.Controls.LabelControl();
            this.txtChu_Tk = new SmartSoft.Controls.TextControl();
            this.lblTen_NH = new SmartSoft.Controls.LabelControl();
            this.txtTen_NH = new SmartSoft.Controls.TextControl();
            this.lblTen_TP = new SmartSoft.Controls.LabelControl();
            this.txtTen_TP = new SmartSoft.Controls.TextControl();
            this.lblNgay_Bd_Ht = new SmartSoft.Controls.LabelControl();
            this.txtNgay_Bd_Ht = new SmartSoft.Controls.TextDate();
            this.lblDia_Chi_E = new SmartSoft.Controls.LabelControl();
            this.txtDia_Chi_E = new SmartSoft.Controls.TextControl();
            this.txtTen_DvCs_Me = new SmartSoft.Controls.TextControl();
            this.txtMa_DvCs_Me = new SmartSoft.Controls.TextSearch();
            this.lblMa_DvCs_Me = new SmartSoft.Controls.LabelControl();
            this.SuspendLayout();
            // 
            // btnOk
            // 
            this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.btnOk.Font = new System.Drawing.Font("Arial", 8.25F);
            this.btnOk.Location = new System.Drawing.Point(283, 219);
            this.btnOk.Name = "btnOk";
            this.btnOk.Size = new System.Drawing.Size(75, 23);
            this.btnOk.TabIndex = 11;
            this.btnOk.Text = "&Chấp nhận";
            this.btnOk.UseVisualStyleBackColor = true;
            this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
            // 
            // btnCancel
            // 
            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnCancel.Font = new System.Drawing.Font("Arial", 8.25F);
            this.btnCancel.Location = new System.Drawing.Point(364, 219);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(75, 23);
            this.btnCancel.TabIndex = 12;
            this.btnCancel.Text = "&Hủy bỏ";
            this.btnCancel.UseVisualStyleBackColor = true;
            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
            // 
            // lblTen_Dvcs
            // 
            this.lblTen_Dvcs.AutoSize = true;
            this.lblTen_Dvcs.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTen_Dvcs.Location = new System.Drawing.Point(9, 9);
            this.lblTen_Dvcs.Name = "lblTen_Dvcs";
            this.lblTen_Dvcs.Size = new System.Drawing.Size(58, 14);
            this.lblTen_Dvcs.TabIndex = 13;
            this.lblTen_Dvcs.Text = "Tên đơn vị";
            // 
            // txtTen_Dvcs
            // 
            this.txtTen_Dvcs.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Dvcs.CheckTextSearched = false;
            this.txtTen_Dvcs.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTen_Dvcs.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Dvcs.Location = new System.Drawing.Point(98, 6);
            this.txtTen_Dvcs.Name = "txtTen_Dvcs";
            this.txtTen_Dvcs.OldValue = null;
            this.txtTen_Dvcs.Size = new System.Drawing.Size(341, 20);
            this.txtTen_Dvcs.TabIndex = 0;
            this.txtTen_Dvcs.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_Dvcs.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // lblTen_Dvcs_E
            // 
            this.lblTen_Dvcs_E.AutoSize = true;
            this.lblTen_Dvcs_E.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTen_Dvcs_E.Location = new System.Drawing.Point(9, 32);
            this.lblTen_Dvcs_E.Name = "lblTen_Dvcs_E";
            this.lblTen_Dvcs_E.Size = new System.Drawing.Size(73, 14);
            this.lblTen_Dvcs_E.TabIndex = 14;
            this.lblTen_Dvcs_E.Text = "Tên tiếng Anh";
            // 
            // txtTen_Dvcs_E
            // 
            this.txtTen_Dvcs_E.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Dvcs_E.CheckTextSearched = false;
            this.txtTen_Dvcs_E.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTen_Dvcs_E.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Dvcs_E.Location = new System.Drawing.Point(98, 29);
            this.txtTen_Dvcs_E.Name = "txtTen_Dvcs_E";
            this.txtTen_Dvcs_E.OldValue = null;
            this.txtTen_Dvcs_E.Size = new System.Drawing.Size(341, 20);
            this.txtTen_Dvcs_E.TabIndex = 1;
            this.txtTen_Dvcs_E.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_Dvcs_E.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // lblDia_Chi
            // 
            this.lblDia_Chi.AutoSize = true;
            this.lblDia_Chi.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDia_Chi.Location = new System.Drawing.Point(9, 55);
            this.lblDia_Chi.Name = "lblDia_Chi";
            this.lblDia_Chi.Size = new System.Drawing.Size(40, 14);
            this.lblDia_Chi.TabIndex = 15;
            this.lblDia_Chi.Text = "Địa chỉ";
            // 
            // txtDia_Chi
            // 
            this.txtDia_Chi.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtDia_Chi.CheckTextSearched = false;
            this.txtDia_Chi.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtDia_Chi.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDia_Chi.Location = new System.Drawing.Point(98, 52);
            this.txtDia_Chi.Name = "txtDia_Chi";
            this.txtDia_Chi.OldValue = null;
            this.txtDia_Chi.Size = new System.Drawing.Size(341, 20);
            this.txtDia_Chi.TabIndex = 2;
            this.txtDia_Chi.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtDia_Chi.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // lblMs_Thue
            // 
            this.lblMs_Thue.AutoSize = true;
            this.lblMs_Thue.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMs_Thue.Location = new System.Drawing.Point(9, 101);
            this.lblMs_Thue.Name = "lblMs_Thue";
            this.lblMs_Thue.Size = new System.Drawing.Size(69, 14);
            this.lblMs_Thue.TabIndex = 17;
            this.lblMs_Thue.Text = "Số điện thoại";
            // 
            // txtMs_Thue
            // 
            this.txtMs_Thue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtMs_Thue.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMs_Thue.CheckTextSearched = false;
            this.txtMs_Thue.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMs_Thue.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMs_Thue.Location = new System.Drawing.Point(98, 98);
            this.txtMs_Thue.Name = "txtMs_Thue";
            this.txtMs_Thue.OldValue = null;
            this.txtMs_Thue.Size = new System.Drawing.Size(114, 20);
            this.txtMs_Thue.TabIndex = 4;
            this.txtMs_Thue.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtMs_Thue.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // lblTk_NH
            // 
            this.lblTk_NH.AutoSize = true;
            this.lblTk_NH.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTk_NH.Location = new System.Drawing.Point(228, 101);
            this.lblTk_NH.Name = "lblTk_NH";
            this.lblTk_NH.Size = new System.Drawing.Size(41, 14);
            this.lblTk_NH.TabIndex = 1;
            this.lblTk_NH.Text = "Số Fax";
            // 
            // txtTk_NH
            // 
            this.txtTk_NH.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTk_NH.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtTk_NH.CheckTextSearched = false;
            this.txtTk_NH.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTk_NH.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTk_NH.Location = new System.Drawing.Point(275, 98);
            this.txtTk_NH.Name = "txtTk_NH";
            this.txtTk_NH.OldValue = null;
            this.txtTk_NH.Size = new System.Drawing.Size(164, 20);
            this.txtTk_NH.TabIndex = 5;
            this.txtTk_NH.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTk_NH.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // lblChu_Tk
            // 
            this.lblChu_Tk.AutoSize = true;
            this.lblChu_Tk.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblChu_Tk.Location = new System.Drawing.Point(9, 124);
            this.lblChu_Tk.Name = "lblChu_Tk";
            this.lblChu_Tk.Size = new System.Drawing.Size(84, 14);
            this.lblChu_Tk.TabIndex = 18;
            this.lblChu_Tk.Text = "Họ tên giám đốc";
            // 
            // txtChu_Tk
            // 
            this.txtChu_Tk.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtChu_Tk.CheckTextSearched = false;
            this.txtChu_Tk.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtChu_Tk.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtChu_Tk.Location = new System.Drawing.Point(98, 121);
            this.txtChu_Tk.Name = "txtChu_Tk";
            this.txtChu_Tk.OldValue = null;
            this.txtChu_Tk.Size = new System.Drawing.Size(341, 20);
            this.txtChu_Tk.TabIndex = 6;
            this.txtChu_Tk.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtChu_Tk.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // lblTen_NH
            // 
            this.lblTen_NH.AutoSize = true;
            this.lblTen_NH.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTen_NH.Location = new System.Drawing.Point(9, 147);
            this.lblTen_NH.Name = "lblTen_NH";
            this.lblTen_NH.Size = new System.Drawing.Size(79, 14);
            this.lblTen_NH.TabIndex = 19;
            this.lblTen_NH.Text = "Mobile và Email";
            // 
            // txtTen_NH
            // 
            this.txtTen_NH.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_NH.CheckTextSearched = false;
            this.txtTen_NH.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTen_NH.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_NH.Location = new System.Drawing.Point(98, 144);
            this.txtTen_NH.Name = "txtTen_NH";
            this.txtTen_NH.OldValue = null;
            this.txtTen_NH.Size = new System.Drawing.Size(341, 20);
            this.txtTen_NH.TabIndex = 7;
            this.txtTen_NH.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_NH.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // lblTen_TP
            // 
            this.lblTen_TP.AutoSize = true;
            this.lblTen_TP.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTen_TP.Location = new System.Drawing.Point(9, 170);
            this.lblTen_TP.Name = "lblTen_TP";
            this.lblTen_TP.Size = new System.Drawing.Size(58, 14);
            this.lblTen_TP.TabIndex = 20;
            this.lblTen_TP.Text = "Thành phố";
            // 
            // txtTen_TP
            // 
            this.txtTen_TP.CheckTextSearched = false;
            this.txtTen_TP.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTen_TP.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_TP.Location = new System.Drawing.Point(98, 167);
            this.txtTen_TP.Name = "txtTen_TP";
            this.txtTen_TP.OldValue = null;
            this.txtTen_TP.Size = new System.Drawing.Size(114, 20);
            this.txtTen_TP.TabIndex = 8;
            this.txtTen_TP.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_TP.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // lblNgay_Bd_Ht
            // 
            this.lblNgay_Bd_Ht.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblNgay_Bd_Ht.AutoSize = true;
            this.lblNgay_Bd_Ht.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblNgay_Bd_Ht.Location = new System.Drawing.Point(228, 170);
            this.lblNgay_Bd_Ht.Name = "lblNgay_Bd_Ht";
            this.lblNgay_Bd_Ht.Size = new System.Drawing.Size(113, 14);
            this.lblNgay_Bd_Ht.TabIndex = 3;
            this.lblNgay_Bd_Ht.Text = "Ngày bắt đầu làm việc";
            // 
            // txtNgay_Bd_Ht
            // 
            this.txtNgay_Bd_Ht.DateTimeFormat = SmartSoft.Controls.TextDate.DateTimeFormatType.Date;
            this.txtNgay_Bd_Ht.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtNgay_Bd_Ht.InsertKeyMode = System.Windows.Forms.InsertKeyMode.Overwrite;
            this.txtNgay_Bd_Ht.Location = new System.Drawing.Point(347, 167);
            this.txtNgay_Bd_Ht.Mask = "00/00/0000";
            this.txtNgay_Bd_Ht.Name = "txtNgay_Bd_Ht";
            this.txtNgay_Bd_Ht.OldValue = null;
            this.txtNgay_Bd_Ht.Size = new System.Drawing.Size(92, 20);
            this.txtNgay_Bd_Ht.TabIndex = 9;

            // 
            // lblDia_Chi_E
            // 
            this.lblDia_Chi_E.AutoSize = true;
            this.lblDia_Chi_E.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDia_Chi_E.Location = new System.Drawing.Point(9, 78);
            this.lblDia_Chi_E.Name = "lblDia_Chi_E";
            this.lblDia_Chi_E.Size = new System.Drawing.Size(88, 14);
            this.lblDia_Chi_E.TabIndex = 16;
            this.lblDia_Chi_E.Text = "Địa chỉ tiếng Anh";
            // 
            // txtDia_Chi_E
            // 
            this.txtDia_Chi_E.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtDia_Chi_E.CheckTextSearched = false;
            this.txtDia_Chi_E.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtDia_Chi_E.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDia_Chi_E.Location = new System.Drawing.Point(98, 75);
            this.txtDia_Chi_E.Name = "txtDia_Chi_E";
            this.txtDia_Chi_E.OldValue = null;
            this.txtDia_Chi_E.Size = new System.Drawing.Size(341, 20);
            this.txtDia_Chi_E.TabIndex = 3;
            this.txtDia_Chi_E.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtDia_Chi_E.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
 
            // 
            // txtTen_DvCs_Me
            // 
            this.txtTen_DvCs_Me.BackColor = System.Drawing.SystemColors.Control;
            this.txtTen_DvCs_Me.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_DvCs_Me.CheckTextSearched = false;
            this.txtTen_DvCs_Me.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_DvCs_Me.Enabled = false;
            this.txtTen_DvCs_Me.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_DvCs_Me.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_DvCs_Me.Location = new System.Drawing.Point(228, 193);
            this.txtTen_DvCs_Me.Name = "txtTen_DvCs_Me";
            this.txtTen_DvCs_Me.OldValue = null;
            this.txtTen_DvCs_Me.Size = new System.Drawing.Size(211, 13);
            this.txtTen_DvCs_Me.TabIndex = 22;
            this.txtTen_DvCs_Me.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_DvCs_Me.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;

            // 
            // txtMa_DvCs_Me
            // 
            this.txtMa_DvCs_Me.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_DvCs_Me.CheckTextSearched = false;
            this.txtMa_DvCs_Me.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_DvCs_Me.EmptyIsValid = true;
            this.txtMa_DvCs_Me.FieldDisplay = "Ten_DvCs";
            this.txtMa_DvCs_Me.FirstFilter = "Ma_TH = \'C\'";
            this.txtMa_DvCs_Me.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_DvCs_Me.Location = new System.Drawing.Point(98, 190);
            this.txtMa_DvCs_Me.MaxLength = 32;
            this.txtMa_DvCs_Me.Name = "txtMa_DvCs_Me";
            this.txtMa_DvCs_Me.OldValue = null;
            this.txtMa_DvCs_Me.Size = new System.Drawing.Size(114, 20);
            this.txtMa_DvCs_Me.TabIndex = 10;
            this.txtMa_DvCs_Me.TableName = "DMDVCS";
            this.txtMa_DvCs_Me.TextDisplay = this.txtTen_DvCs_Me;
            this.txtMa_DvCs_Me.UserTextLength = SmartSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_DvCs_Me.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.All;

            // 
            // lblMa_DvCs_Me
            // 
            this.lblMa_DvCs_Me.AutoSize = true;
            this.lblMa_DvCs_Me.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold);
            this.lblMa_DvCs_Me.Location = new System.Drawing.Point(9, 192);
            this.lblMa_DvCs_Me.Name = "lblMa_DvCs_Me";
            this.lblMa_DvCs_Me.Size = new System.Drawing.Size(66, 14);
            this.lblMa_DvCs_Me.TabIndex = 21;
            this.lblMa_DvCs_Me.Text = "Trực thuộc";
            // 
            // FormCompanyEditor
            // 
            this.CancelButton = this.btnCancel;
            this.ClientSize = new System.Drawing.Size(451, 254);
            this.Controls.Add(this.txtTen_DvCs_Me);
            this.Controls.Add(this.txtMa_DvCs_Me);
            this.Controls.Add(this.lblMa_DvCs_Me);
            this.Controls.Add(this.txtNgay_Bd_Ht);
            this.Controls.Add(this.lblNgay_Bd_Ht);
            this.Controls.Add(this.txtTen_TP);
            this.Controls.Add(this.lblTen_TP);
            this.Controls.Add(this.txtTen_NH);
            this.Controls.Add(this.lblTen_NH);
            this.Controls.Add(this.txtChu_Tk);
            this.Controls.Add(this.lblChu_Tk);
            this.Controls.Add(this.txtTk_NH);
            this.Controls.Add(this.lblTk_NH);
            this.Controls.Add(this.txtMs_Thue);
            this.Controls.Add(this.lblMs_Thue);
            this.Controls.Add(this.txtDia_Chi_E);
            this.Controls.Add(this.lblDia_Chi_E);
            this.Controls.Add(this.txtDia_Chi);
            this.Controls.Add(this.lblDia_Chi);
            this.Controls.Add(this.txtTen_Dvcs_E);
            this.Controls.Add(this.lblTen_Dvcs_E);
            this.Controls.Add(this.txtTen_Dvcs);
            this.Controls.Add(this.lblTen_Dvcs);
            this.Controls.Add(this.btnCancel);
            this.Controls.Add(this.btnOk);
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "FormCompanyEditor";
            this.ShowInTaskbar = false;
            this.Text = "Thông tin đơn vị cơ sở";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        private void OnSave()
        {

            this.CheckAccepted = true;
            this.oTable.Rows[0]["Ten_Dvcs"] = this.txtTen_Dvcs.Text;
            this.oTable.Rows[0]["Ten_Dvcs_E"] = this.txtTen_Dvcs_E.Text;
            this.oTable.Rows[0]["Dia_Chi"] = this.txtDia_Chi.Text;
            this.oTable.Rows[0]["Dia_Chi_E"] = this.txtDia_Chi_E.Text;
            this.oTable.Rows[0]["Ms_Thue"] = this.txtMs_Thue.Text;
            this.oTable.Rows[0]["Tk_NH"] = this.txtTk_NH.Text;
            this.oTable.Rows[0]["Chu_Tk"] = this.txtChu_Tk.Text;
            this.oTable.Rows[0]["Ten_NH"] = this.txtTen_NH.Text;
            this.oTable.Rows[0]["Ten_TP"] = this.txtTen_TP.Text;
            this.oTable.Rows[0]["Ma_DvCs_Me"] = this.txtMa_DvCs_Me.Text;
            this.oTable.Rows[0]["Ngay_Bd_Ht"] = this.txtNgay_Bd_Ht.Text;
            this.oDataAccess.SetCompany(this.oTable.Rows[0]);
            base.Close();

        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == (Keys.Control | Keys.Return))
            {
                this.OnSave();
                return true;
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }

        public bool CheckAccepted
        {
            get
            {
                return this.ib_CheckAccepted;
            }
            set
            {
                this.ib_CheckAccepted = value;
            }
        }

        public string CompanyCode
        {
            set
            {
                this.oTable = this.oDataAccess.GetCompanies(value);
                this.txtTen_Dvcs.Text = (string) this.oTable.Rows[0]["Ten_Dvcs"];
                this.txtTen_Dvcs_E.Text = (string) this.oTable.Rows[0]["Ten_Dvcs_E"];
                this.txtDia_Chi.Text = (string) this.oTable.Rows[0]["Dia_Chi"];
                this.txtDia_Chi_E.Text = (string) this.oTable.Rows[0]["Dia_Chi_E"];
                this.txtMs_Thue.Text = (string) this.oTable.Rows[0]["Ms_Thue"];
                this.txtTk_NH.Text = (string) this.oTable.Rows[0]["Tk_NH"];
                this.txtChu_Tk.Text = (string) this.oTable.Rows[0]["Chu_Tk"];
                this.txtTen_NH.Text = (string) this.oTable.Rows[0]["Ten_NH"];
                this.txtTen_TP.Text = (string) this.oTable.Rows[0]["Ten_TP"];
                this.txtMa_DvCs_Me.Text = Convert.ToString(this.oTable.Rows[0]["Ma_DvCs_Me"]);
                this.txtNgay_Bd_Ht.Text = ((DateTime) this.oTable.Rows[0]["Ngay_Bd_Ht"]).ToShortDateString();
            }
        }

        public string CompanyFullName
        {
            get
            {
                return this.txtTen_Dvcs.Text;
            }
        }

        public string StartDate
        {
            get
            {
                return this.txtNgay_Bd_Ht.Text;
            }
        }
    }
}

